﻿using Infrastructure.Persistence.Repository;
using Microsoft.Extensions.Configuration;
using Microsoft.Extensions.DependencyInjection;
using Npgsql;

namespace Infrastructure
{
    public static class DependencyInjection
    {
        public static IServiceCollection AddInfrastructure(this IServiceCollection services, IConfiguration configuration)
        {
            services.AddTransient(sp => new NpgsqlConnection(configuration.GetConnectionString("WTContentSiteContext")));
            services.AddScoped<SummaryRepository>();
            return services;
        }
    }
}
